The present application claims priority to Japanese Application No. P10-185256 filed Jun. 30, 1998, which application is incorporated herein by reference to the extent permitted by law.
1. Field of the Invention
The present invention relates to a data storage comprising a storage means having a data storage area divided in a plurality of blocks and in which data written in the data storage area are managed in blocks, and a data processing system for and method of writing or reading data to and/or from the data storage.
2. Description of Related Art
A card type external data storage (will be referred to as xe2x80x9cmemory cardxe2x80x9d hereinunder) has so far been proposed which employs a flash memory (a type of nonvolatile memory, similar to EEPROM (electrically erasable programmable read-only memory)) as an external data storage which is used in electronic devices such as computers, etc.
In the memory card, the flash memory as a data storage has a data storage area divided into a plurality of blocks, and data written in the flash memory are managed in blocks.
In the flash memory, if data are written to the blocks with different frequencies from one to another block, the blocks to which data are written with high frequency are likely to be faulty. To avoid this, it is necessary to write data to all the blocks with a generally same frequency while writing no data to faulty blocks.
To meet the above requirement, the data processing system using a memory card provided with a flash memory as a data storage means is adapted such that data to be stored into the flash memory is divided into a plurality of blocks, address information is added to each of the blocks and the data blocks are written to the blocks of the flash memory to which data have been written with lower frequencies. It should be noted that in the following description, blocks resulted from division of the data storage area of the flash memory will be referred to as xe2x80x9cphysical blocksxe2x80x9d while those resulted from division of data will be referred to as xe2x80x9clogical blocksxe2x80x9d, in order to avoid confusion between the storage area blocks and data blocks. Also the addresses of the physical blocks will be referred to as xe2x80x9cphysical addressxe2x80x9d while those of the logical blocks will be referred to as xe2x80x9clogical addressxe2x80x9d.
To read data from the memory card, access is made first to all the physical blocks of the flash memory, and a table indicating the correspondence between the physical addresses of the physical blocks and logical addresses of the logical blocks stored in the physical blocks is generated in an internal memory of a data processing circuit. Reference is made to this table to detect the physical address of a physical block at which a desired data is stored and then read the desired data from the physical block.
Also, to write data to the memory card, access is made first to all the physical blocks of the flash memory and a table indicating the correspondence between the physical addresses of the physical blocks and the logical addresses of the logical addresses stored in the physical blocks is generated in the internal memory of the data processing circuit. Then, reference is made to the table to detect a physical block which is unused and write a desired data to the unused physical block.
Recently, it has been required more and more for the electronic devices such as computers, etc. to have a higher capability of data processing and process a huge amount of data at a time. In these circumstances, the external data storage used in association with such an electronic device should also have a larger capacity. Also, since a flash memory has been proposed which has a greatly improved degree of integration, an improved memory card has been proposed which has a capacity as large as 128 MB, for example.
The memory card of such a large capacity uses a flash memory having a large number of physical blocks. Therefore, in the large-capacity memory card, the tables generated at each time of data write and read are also large, which necessitates a data processing circuit having a large-capacity internal memory. These requirements have caused to increase the manufacturing cost of the memory card.
Accordingly, the present invention has an object to overcome the above-mentioned drawbacks of the prior art by providing an inexpensive data storage adapted to have an enlarged storage capacity and permit a high efficiency of data write or read, a data processing system and method both using the data storage.
The above object can be attained by providing a data storage for connection to an external device, comprising according to the present invention:
a storage means having a storage area divided in a plurality of blocks each having an absolute address peculiar thereto; and
a control means for writing or reading data to or from the storage means based on a command from the external device;
the control means incorporating a conversion table by which a relative address of a data to which the command from the external device is directed is converted to the absolute address.
Also the above object can be attained by providing a data processing system including a data processing apparatus connected to a data storage comprising a storage means having a storage area divided in a plurality of blocks each having an absolute address peculiar thereto; the data processing apparatus comprising according to the present invention:
means for issuing a command to the storage means to write or read data;
the control means incorporating a conversion table by which a relative address of a data to which the command from the external device is directed is converted to the absolute address.
Further the above object can be attained by providing a data processing method of writing or reading data to or from a storage means having a storage area divided in a plurality of blocks each having an absolute address peculiar thereto; the method comprising, according to the present invention, the steps of:
generating a conversion table by which a relative address of a data to be written to or read from the storage means to the absolute address; and
referring to the conversion table to write or read the data.